<?php defined('_JEXEC') or die('Restricted access'); ?>
<?php
include 'pages.php';
?>
<form action="index.php?option=com_articlecashrewards" method="post" name="adminForm">
<?php defined('_JEXEC') or die('Restricted access'); ?>
<table class="admintable" cellspacing="1">
    <tr>
        <td valign="top" width="20%">
            <table width="100%" cellpadding="0" cellspacing="0">
                <tr>
                    <td align="right">
                        <div style="float: left;"><h2><?php echo JText::_("CPANEL_REPORTS")?></h2></div>
                    </td>
                    <td>
                        <div style="float: right;"><img src="components/com_articlecashrewards/assets/images/icon-48-acr-48.png"></div>
                    </td>
                </tr>
                <tr>
                    <td width="100%" colspan="2">
                        <div class="acrsubmenu">
                        <?php
                            foreach($reportpages as $report){?>
                                <a href="<?php echo $report->link ?>" class="acrlinkblock">
                                    <?php echo JText::_($report->text); ?>
                                </a><?php
                            }
                        ?>
                        </div>
                    </td>
                </tr>
            </table>
        </td>
        <td valign="top" width="80%">
			<fieldset class="adminform">
            <table class="admintable" width="100%">
                <tr>
                    <td>
                        <?php echo JText::_('MSG_RECALC_PAY'); ?><br/><br/>
                    </td>
                </tr>
                <tr>
                    <td align="left" width="100%">
                        <table cellpadding="10" cellspacing="10" border="0" align="left">
                            <tr>
                                <td>
                                    <div id="cpanel" style="text-align: center;">
                                        <div class="icon">
                                            <a href="index.php?option=com_articlecashrewards&controller=reports&task=recalculate">
                                                <img src="<?php echo $recalc_image; ?>" alt="<?php echo JText::_('LABEL_RECALC'); ?>" align="top" border="0" />
                                                <span><?php echo JText::_('LABEL_RECALC') ?></span>
                                            </a>
                                        </div>
                                    </div>
                                </td>
                                <td>
                                    <div id="cpanel" style="text-align: center;">
                                        <div class="icon">
                                            <a href="index.php?option=com_articlecashrewards&controller=reports&task=runpayments">
                                                <img src="<?php echo $run_pay_image; ?>" alt="<?php echo JText::_('LABEL_RUN_PAY_REPORT'); ?>" align="top" border="0" />
                                                <span><?php echo JText::_('LABEL_RUN_PAY_REPORT') ?></span>
                                            </a>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td>
                        <h2><?php echo JText::_('TITLE_AUP_SYNC'); ?></h2>
                    </td>
                </tr>
                <tr>
                    <td><hr size="1"></td>
                </tr>
                <tr>
                    <td><?php echo JText::_('ALPHA_INTEGRATION_WARNING'); ?></td>
                </tr>
                <tr>
                    <td>
                        <table cellpadding="10" cellspacing="10" border="0" align="left">
                            <tr>
                                <td>
                                    <div id="cpanel" style="text-align: center;">
                                        <div class="icon">
                                            <a href="index.php?option=com_articlecashrewards&controller=reports&task=syncaup">
                                                <img src="<?php echo $recalc_image; ?>" alt="<?php echo JText::_('LABEL_RECALC'); ?>" align="top" border="0" />
                                                <span><?php echo JText::_('LABEL_AUP_SYNC') ?></span>
                                            </a>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
			</fieldset>
            <input type="hidden" name="option" value="com_articlecashrewards" />
            <input type="hidden" name="controller" value="reports" />
            <input type="hidden" name="task" value="recalculate" />
            <input type="hidden" name="boxchecked" value="0" />
            <?php echo JHTML::_( 'form.token' ); ?>
        </td>
    </tr>
</table>
</form>
